<?php
require_once 'util/class.constants.php';
require_once 'util/class.daofactory.php';

global $outboxDao;

// 1. test add inbox item
// for($i=0; $i<100; $i++) {
// 	$outboxDao->addOutboxItem($i, 1, $i+400, Constants::$OUTBOX_TYPE_PUBLIC, time());
// 	$outboxDao->addOutboxItem($i, 2, $i+600, Constants::$OUTBOX_TYPE_PUBLIC, time());
// }

// 2. test get outbox list
// $result = $outboxDao->getOutboxList(1, Constants::$OUTBOX_TYPE_PUBLIC, 10, 0);
// $result = $outboxDao->getOutboxList(1, -1, 10, 440);
// echo json_encode($result);

// 3. test get outbox list by timestamp
$result = $outboxDao->getOutboxListByTimestamp(1, Constants::$OUTBOX_TYPE_PUBLIC, 10, 0);
echo json_encode($result)."/n";
$result = $outboxDao->getOutboxListByTimestamp(1, -1, 10, 440);
echo json_encode($result);